package top.wkl.springboot3.service.impl;

import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import top.wkl.springboot3.entity.TbLogic;
import top.wkl.springboot3.mapper.TbLogicMapper;
import top.wkl.springboot3.service.TbLogicService;

import java.util.List;


@Service
@Transactional
@RequiredArgsConstructor
public class TbLogicServiceImpl implements TbLogicService {
    private final TbLogicMapper tbLogicMapper;

    @Override
    public int insert(TbLogic tbLogic){
        int i = tbLogicMapper.insert(tbLogic);
        return i;
    }

    @Override
    public List<TbLogic> query(){
        return tbLogicMapper.selectList(null);
    }

    @Override
    public int delete(TbLogic tbLogic){
        return tbLogicMapper.deleteById(tbLogic);
    }

    @Override
    public List<TbLogic> queryDeleted(){
        return tbLogicMapper.queryDeleted();
    }

}
